package com.hs.mapper;

import com.hs.entity.TbMenu;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface TbMenuMapper {
    int deleteByPrimaryKey(Integer id);


    int insert(TbMenu record);

    int insertSelective(TbMenu record);

    TbMenu selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TbMenu record);

    int updateByPrimaryKey(TbMenu record);

    List<Map<String, Object>> queryMenuByRoleId(Integer roleId);

    List<Map<String,Object>> queryAll();

    public Map<String,Object> queryMenuIdsByRoleId(@Param("roleId") Integer roleId) throws SQLException;

    public Integer deleteById(@Param("id") Integer id)throws SQLException;
    public Integer deleteBatch(String ids)throws SQLException;
    public Integer createMenu(String name)throws SQLException;
    public TbMenu queryById(Integer id) throws SQLException;
    public Integer updateMenu(Map<String,String[]> map)throws SQLException;
}